<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Spec::Story::Runner::StoryParser::State</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Spec::Story::Runner::StoryParser::State</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../../../files/vendor/plugins/rspec/lib/spec/story/runner/story_parser_rb.html">
                vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="../../../../Object.html">
                Object
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000071">comment</a>&nbsp;&nbsp;
      <a href="#M000069">eof</a>&nbsp;&nbsp;
      <a href="#M000066">event</a>&nbsp;&nbsp;
      <a href="#M000064">given</a>&nbsp;&nbsp;
      <a href="#M000065">given_scenario</a>&nbsp;&nbsp;
      <a href="#M000061">new</a>&nbsp;&nbsp;
      <a href="#M000070">other</a>&nbsp;&nbsp;
      <a href="#M000067">outcome</a>&nbsp;&nbsp;
      <a href="#M000068">remove_tag_from</a>&nbsp;&nbsp;
      <a href="#M000063">scenario</a>&nbsp;&nbsp;
      <a href="#M000062">story</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000061" class="method-detail">
        <a name="M000061"></a>

        <div class="method-heading">
          <a href="#M000061" class="method-signature">
          <span class="method-name">new</span><span class="method-args">(parser)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000061-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000061-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb, line 97</span>
97:           <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">parser</span>)
98:             <span class="ruby-ivar">@parser</span> = <span class="ruby-identifier">parser</span>
99:           <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000071" class="method-detail">
        <a name="M000071"></a>

        <div class="method-heading">
          <a href="#M000071" class="method-signature">
          <span class="method-name">comment</span><span class="method-args">(line)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000071-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000071-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb, line 145</span>
145:           <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">comment</span>(<span class="ruby-identifier">line</span>)
146:           <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000069" class="method-detail">
        <a name="M000069"></a>

        <div class="method-heading">
          <a href="#M000069" class="method-signature">
          <span class="method-name">eof</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000069-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000069-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb, line 138</span>
138:           <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">eof</span>
139:           <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000066" class="method-detail">
        <a name="M000066"></a>

        <div class="method-heading">
          <a href="#M000066" class="method-signature">
          <span class="method-name">event</span><span class="method-args">(line)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000066-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000066-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb, line 121</span>
121:           <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">event</span>(<span class="ruby-identifier">line</span>)
122:             <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">create_when</span>(<span class="ruby-identifier">remove_tag_from</span>(<span class="ruby-identifier">:when</span>, <span class="ruby-identifier">line</span>))
123:             <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">transition_to</span>(<span class="ruby-identifier">:when_state</span>)
124:           <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000064" class="method-detail">
        <a name="M000064"></a>

        <div class="method-heading">
          <a href="#M000064" class="method-signature">
          <span class="method-name">given</span><span class="method-args">(line)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000064-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000064-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb, line 111</span>
111:           <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">given</span>(<span class="ruby-identifier">line</span>)
112:             <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">create_given</span>(<span class="ruby-identifier">remove_tag_from</span>(<span class="ruby-identifier">:given</span>, <span class="ruby-identifier">line</span>))
113:             <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">transition_to</span>(<span class="ruby-identifier">:given_state</span>)
114:           <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000065" class="method-detail">
        <a name="M000065"></a>

        <div class="method-heading">
          <a href="#M000065" class="method-signature">
          <span class="method-name">given_scenario</span><span class="method-args">(line)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000065-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000065-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb, line 116</span>
116:           <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">given_scenario</span>(<span class="ruby-identifier">line</span>)
117:             <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">create_given_scenario</span>(<span class="ruby-identifier">remove_tag_from</span>(<span class="ruby-identifier">:givenscenario</span>, <span class="ruby-identifier">line</span>))
118:             <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">transition_to</span>(<span class="ruby-identifier">:given_state</span>)
119:           <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000070" class="method-detail">
        <a name="M000070"></a>

        <div class="method-heading">
          <a href="#M000070" class="method-signature">
          <span class="method-name">other</span><span class="method-args">(line)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000070-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000070-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb, line 141</span>
141:           <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">other</span>(<span class="ruby-identifier">line</span>)
142:             <span class="ruby-comment cmt"># no-op - supports header text before the first story in a file</span>
143:           <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000067" class="method-detail">
        <a name="M000067"></a>

        <div class="method-heading">
          <a href="#M000067" class="method-signature">
          <span class="method-name">outcome</span><span class="method-args">(line)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000067-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000067-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb, line 126</span>
126:           <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">outcome</span>(<span class="ruby-identifier">line</span>)
127:             <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">create_then</span>(<span class="ruby-identifier">remove_tag_from</span>(<span class="ruby-identifier">:then</span>, <span class="ruby-identifier">line</span>))
128:             <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">transition_to</span>(<span class="ruby-identifier">:then_state</span>)
129:           <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000068" class="method-detail">
        <a name="M000068"></a>

        <div class="method-heading">
          <a href="#M000068" class="method-signature">
          <span class="method-name">remove_tag_from</span><span class="method-args">(tag, line)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000068-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000068-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb, line 131</span>
131:           <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_tag_from</span>(<span class="ruby-identifier">tag</span>, <span class="ruby-identifier">line</span>)
132:             <span class="ruby-identifier">tokens</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>
133:             <span class="ruby-comment cmt"># validation of tag can go here</span>
134:             <span class="ruby-identifier">tokens</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">downcase</span>.<span class="ruby-identifier">match</span>(<span class="ruby-node">/#{tag.to_s}:?/</span>) <span class="ruby-operator">?</span> 
135:                                 (<span class="ruby-identifier">tokens</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>].<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)) <span class="ruby-operator">:</span> <span class="ruby-identifier">line</span>
136:           <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000063" class="method-detail">
        <a name="M000063"></a>

        <div class="method-heading">
          <a href="#M000063" class="method-signature">
          <span class="method-name">scenario</span><span class="method-args">(line)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000063-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000063-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb, line 106</span>
106:           <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scenario</span>(<span class="ruby-identifier">line</span>)
107:             <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">create_scenario</span>(<span class="ruby-identifier">line</span>)
108:             <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">transition_to</span>(<span class="ruby-identifier">:scenario_state</span>)
109:           <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000062" class="method-detail">
        <a name="M000062"></a>

        <div class="method-heading">
          <a href="#M000062" class="method-signature">
          <span class="method-name">story</span><span class="method-args">(line)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000062-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000062-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/runner/story_parser.rb, line 101</span>
101:           <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">story</span>(<span class="ruby-identifier">line</span>)
102:             <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">init_story</span>(<span class="ruby-identifier">line</span>)
103:             <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">transition_to</span>(<span class="ruby-identifier">:story_state</span>)
104:           <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>